<%-- 
    Document   : list_kiv
    Created on : Apr 21, 2014, 10:40:35 AM
    Author     : Mansur
--%>

<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>.: Ship Visit :.</title>    
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.blockUI.js"></script>
        <script type="text/javascript"> 
            
        </script>
    </head>
    <body>
        <s:messages/>
        <s:errors/>
        <s:useActionBean beanclass="exatrez.stripes.util.ListUtil" var="list"/>
        <s:form beanclass="exatrez.stripes.action.ShipVisit3FlowAction" name="formList">
            <s:hidden name="counterId" />
            <div>
                <fieldset>
                    <div id="page-title">
                        <span class="title">Ship Visit - Submitted</span>
                    </div>
                    <p>
                        <label>Year Visit :</label>
                        <c:set var="count" value="6"/>
                        <c:set var="now" value="<%=new java.util.Date().getYear() + 1900 %>"/>
                        <s:select name="currentYear" style="width:150px">
                            <s:option value="">Please Choose</s:option>
                            <s:option value="${now}">${now}</s:option>
                            <c:forEach var="i" begin="1" end="${count}">
                                <s:option value="${now - i}">${now - i}</s:option>
                            </c:forEach>
                        </s:select>
                            &nbsp;&nbsp;&nbsp;
                            <s:submit name="visitKiv" value="Search" class="btn"/>
                    </p>
                    <c:if test="${!empty(actionBean.listCounter)}">
                        <div style="align: center">
                            <span class="sub-title">Ship visit target as per year ${actionBean.currentYear}</span>
                            <display:table class="tablecloth" name="${actionBean.listCounter}" requestURI="/shipVisit3Flow" id="line" style="width:50%">
                                <display:column title="Target Visit" property="target"/>
                                <display:column title="No. of visit" property="visited"/>
                                <display:column title="Total Balance"><c:out value="${line.target - line.visited}" /></display:column>                 
                            </display:table>
                        </div>
                        <br>
                    </c:if>
                    <div>
                        <c:if test="${!empty(actionBean.listCounter)}">
                            <span class="sub-title">Submitted ship visit report as per year ${actionBean.currentYear} waiting for superior to verify</span>
                        </c:if>
                        <c:if test="${empty(actionBean.listCounter)}">
                            <span class="sub-title">Submitted ship visit report as per year ${actionBean.currentYear}</span>
                        </c:if>
                        <display:table class="tablecloth" name="${actionBean.listKIV}" requestURI="/shipVisit3Flow?visitKiv" id="line" >
                            <display:column title="No." sortable="true"><center>${line_rowNum}.</center></display:column>
                            <display:column title="Vessel Name" sortable="true" >
                                <a href="shipVisit3Flow?viewEditForm&flagEdit=1&stage=kiv&idVisit=${line.shipVisit3Id}">${line.vessel.vesselName}</a>
                            </display:column>
                            <display:column title="Date Visit" sortable="true" ><fmt:formatDate value="${line.dateVisit}" pattern="dd/MM/yyyy"/></display:column>
                            <display:column title="Location" sortable="true" property="location"/>
                            <display:column title="Date Submit" sortable="true"><fmt:formatDate value="${line.infoAudit.createDate}" pattern="dd/MM/yyyy hh:mm:ss a"/></display:column>
                        </display:table>
                    </div>
                </fieldset>
            </div>
        </s:form>
    </body>
</html>
